<extend name="Home@Base/common" />
<block name="body">
    <div class="span9 page_message">
        <section id="contents"> <include file="Home@Addons/_nav" />
            <div class="tab-content">
                <php> $post_url || $post_url = U('add?model='.$model['id'], $get_param);</php>
                <div class="form-horizontal form-center" method="post" action="{$post_url}" id="form">
                    <div class="form-item cf">
                        <label class="item-label"> <span class="need_flag">*</span> 菜单名 </label>
                        <div class="controls">
                            <input type="text" value="{$data.title}" name="title" class="text" >
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label"> <span class="need_flag">*</span> controller </label>
                        <div class="controls">
                            <input type="text" value="{$data.controller}" name="controller" class="text" >
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label"> <span class="need_flag">*</span> action </label>
                        <div class="controls">
                            <input type="text" value="{$data.action}" name="action" class="text" >
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label"> addon_url </label>
                        <div class="controls">
                            <input type="text" value="{$data.url}" name="url" class="text" >
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label"> <span class="need_flag">*</span> 父菜单 </label>
                        <div class="controls">
                            <input type="number" value="{$data.pid}" name="pid" class="text" >
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label"> <span class="need_flag">*</span> 排序 </label>
                        <div class="controls">
                            <input type="number" value="{$data.sort}" name="sort" class="text" >
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label"> <span class="need_flag">*</span>角色<span class="check-tips"></span></label>
                        <div class="controls">
                            <volist name="roles" id="vo">
                                <input type='checkbox' name='{$vo.name}' value=1 {$vo.checked}>{$vo.name}<br>
                            </volist>
                        </div>
                    </div>
                    <div class="form-item form_bh" style="float: left">
                        <input type="hidden" name="id" value="{$data.id}">
                        <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
                    </div>
                    </form>
                </div>
        </section>
    </div>
</block>
